acf wp_query custom field

50

acf wp_query custom field -

// WPQuery using ACF basic fields
$args = array( 
	'post_type'   => 'post',
    'posts_per_page' => '20',
    'meta_key'		=> 'color',
    'meta_value'	=> 'blue' // Can be string or true/false
);
$posts = new WP_Query( $args );

Comments

Submit
0 Comments